package net.roseparadise.model;
// default package

import javax.persistence.Column;
import javax.persistence.Embeddable;


/**
 * PersonalityId entity. @author MyEclipse Persistence Tools
 */
@Embeddable

public class PersonalityId  implements java.io.Serializable {


    // Fields    

     private Integer memberid;
     private Integer personalityid;


    // Constructors

    /** default constructor */
    public PersonalityId() {
    }

    
    /** full constructor */
    public PersonalityId(Integer memberid, Integer personalityid) {
        this.memberid = memberid;
        this.personalityid = personalityid;
    }

   
    // Property accessors

    @Column(name="MEMBERID", nullable=false)

    public Integer getMemberid() {
        return this.memberid;
    }
    
    public void setMemberid(Integer memberid) {
        this.memberid = memberid;
    }

    @Column(name="PERSONALITYID", nullable=false)

    public Integer getPersonalityid() {
        return this.personalityid;
    }
    
    public void setPersonalityid(Integer personalityid) {
        this.personalityid = personalityid;
    }
   



   public boolean equals(Object other) {
         if ( (this == other ) ) return true;
		 if ( (other == null ) ) return false;
		 if ( !(other instanceof PersonalityId) ) return false;
		 PersonalityId castOther = ( PersonalityId ) other; 
         
		 return ( (this.getMemberid()==castOther.getMemberid()) || ( this.getMemberid()!=null && castOther.getMemberid()!=null && this.getMemberid().equals(castOther.getMemberid()) ) )
 && ( (this.getPersonalityid()==castOther.getPersonalityid()) || ( this.getPersonalityid()!=null && castOther.getPersonalityid()!=null && this.getPersonalityid().equals(castOther.getPersonalityid()) ) );
   }
   
   public int hashCode() {
         int result = 17;
         
         result = 37 * result + ( getMemberid() == null ? 0 : this.getMemberid().hashCode() );
         result = 37 * result + ( getPersonalityid() == null ? 0 : this.getPersonalityid().hashCode() );
         return result;
   }   





}